<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("warcorps", $con);
$dateTime = date("Y-m-d",strtotime("-1 day"));
#$dateTime = '2012-04-14';

mysql_query("INSERT INTO blacklist SELECT max( id ),
  INSERT INTO warcorps_query_temp
SELECT max(id),
  firstlogindata,
  firstlogin,
  isJailbreak,
  isIAPCrack,
  BuyAmmoMoney,
  Character01PlayTotalTime,
  Character02PlayTotalTime,
  Character03PlayTotalTime,
  Character04PlayTotalTime,
  CurrentCrystal,
  CurrentMoney,
  UnlockCharacter01,
  UnlockCharacter02,
  UnlockCharacter03,
  UnlockCharacter04,
  I_Item00,
  I_Item01,
  I_Item02,
  I_Item03,
  I_Item04,
  I_Item05,
  I_Item06,
  I_Item07,
  I_Item08,
  I_Item09,
  I_Item10,
  I_Item11,
  I_Item12,
  I_Item13,
  I_Item14,
  I_Item15,
  I_Item16,
  Level,
  UnlockArmor,
  UnlockWeapon,
  gameId,
  gameVersion,
  timeBegin,
  timeEnd,
  paly0_timeEnter,
  paly0_timeLeave,
  paly1_timeEnter,
  paly1_timeLeave,
  paly2_timeEnter,
  paly2_timeLeave,
  paly3_timeEnter,
  paly3_timeLeave,
  paly4_timeEnter,
  paly4_timeLeave,
  paly5_timeEnter,
  paly5_timeLeave,
  paly6_timeEnter,
  paly6_timeLeave,
  paly7_timeEnter,
  paly7_timeLeave,
  paly8_timeEnter,
  paly8_timeLeave,
  paly9_timeEnter,
  paly9_timeLeave,
  iap_productId_0,
  iap_count_0,
  iap_productId_1,
  iap_count_1,
  iap_productId_2,
  iap_count_2,
  iap_productId_3,
  iap_count_3,
  iap_productId_4,
  iap_count_4,
  iap_productId_5,
  iap_count_5,
  iap_productId_6,
  iap_count_6,
  iap_productId_7,
  iap_count_7,
  iap_productId_8,
  iap_count_8,
  iap_productId_9,
  iap_count_9,
  iap_productId_10,
  iap_count_10,
  iap_productId_11,
  iap_count_11,
  iap_productId_12,
  iap_count_12,
  iap_productId_13,
  iap_count_13,
  iap_productId_14,
  iap_count_14,
  iap_productId_15,
  iap_count_15,
  deviceid,
  gamename,
  createdate,
  date
  FROM  warcorps_query where dayPlayShortTime = 10000000 GROUP BY deviceid");  //where 条件按需求来做修改
mysql_query("delete from warcorps_query where dayPlayShortTime = 10000000");   //

mysql_close($con);
?>